package com.sailing.xjpb.orm.intercepter.annotation;

import com.sailing.xjpb.orm.intercepter.CrudRepositoryHandler;
import com.sailing.xjpb.orm.intercepter.impl.DefaultCurdRepositoryOperatorHandler;

import java.lang.annotation.*;
import java.util.Date;

/**
 * 业务中有保存或更新实体时，有需要使用数据库当前时间进行字段更新，区别于{@linkplain org.springframework.data.annotation.LastModifiedDate}
 * <p/>
 * 实现逻辑参考{@linkplain CrudRepositoryHandler}和{@linkplain DefaultCurdRepositoryOperatorHandler#setDbTime(Object, boolean, Date)}
 * add by YaoWei since 2024-11-26
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface DbUpdateTime {

}
